package top.yongyan0624.service.impl;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.yongyan0624.entity.Alipay;
import top.yongyan0624.mapper.PayMapper;
import top.yongyan0624.service.AlipayService;
import top.yongyan0624.utils.AlipayUtils;

/**
 * @author Yongyan
 * @description: TODO
 * @date 2021/9/11
 **/
@Service
public class AlipayServiceImpl extends ServiceImpl<PayMapper, Alipay> implements AlipayService {

    @Autowired
    private AlipayUtils alipayUtils;

    @Override
    public String aliPay(Alipay alipay) throws AlipayApiException {
        return alipayUtils.pay(alipay);
    }
}
